<?php
/**
 * TOP API: alitrip.travel.trade.close request
 * 
 * @author auto create
 * @since 1.0, 2018.07.25
 */
class AlitripTravelTradeCloseRequest
{
	/** 
	 * 交易关闭原因
	 **/
	private $closeReason;
	
	/** 
	 * 订单关闭原因描述
	 **/
	private $reasonDesc;
	
	/** 
	 * 子订单编号
	 **/
	private $subOrderId;
	
	private $apiParas = array();
	
	public function setCloseReason($closeReason)
	{
		$this->closeReason = $closeReason;
		$this->apiParas["close_reason"] = $closeReason;
	}

	public function getCloseReason()
	{
		return $this->closeReason;
	}

	public function setReasonDesc($reasonDesc)
	{
		$this->reasonDesc = $reasonDesc;
		$this->apiParas["reason_desc"] = $reasonDesc;
	}

	public function getReasonDesc()
	{
		return $this->reasonDesc;
	}

	public function setSubOrderId($subOrderId)
	{
		$this->subOrderId = $subOrderId;
		$this->apiParas["sub_order_id"] = $subOrderId;
	}

	public function getSubOrderId()
	{
		return $this->subOrderId;
	}

	public function getApiMethodName()
	{
		return "alitrip.travel.trade.close";
	}
	
	public function getApiParas()
	{
		return $this->apiParas;
	}
	
	public function check()
	{
		
		RequestCheckUtil::checkNotNull($this->closeReason,"closeReason");
		RequestCheckUtil::checkNotNull($this->subOrderId,"subOrderId");
	}
	
	public function putOtherTextParam($key, $value) {
		$this->apiParas[$key] = $value;
		$this->$key = $value;
	}
}
